#include "com/cns/android/gateway/gateway.h"

using namespace android;
using namespace gateway_system;

/*
 * ---------------------------------------------------------------------------
 *
 *  Client Proxy
 */
namespace gateway_system {

    IMPLEMENT_META_INTERFACE(GatewaySystemService,META_INTERFACE_NAME);

    BpGatewaySystemService::BpGatewaySystemService(const sp<IBinder>& impl ):BpInterface<IGatewaySystemService>(impl)
    {

    }

    void BpGatewaySystemService::beginLog()
    {
        Parcel data, reply;
        data.writeInterfaceToken(IGatewaySystemService::getInterfaceDescriptor());
        //By operation code to transact
        remote()->transact(BEGINLOG, data, &reply);
        //Exception Code. In Java Level, aidl auto generate codes will process exceptioncode.
        reply.readExceptionCode();
        //return (char*)reply.readCString();
    }

    void BpGatewaySystemService::endLog()
    {
        Parcel data, reply;
        data.writeInterfaceToken(IGatewaySystemService::getInterfaceDescriptor());
        remote()->transact(ENDLOG, data, &reply);
        reply.readExceptionCode();
    }


}//end of namespace demo_api
/*
 * End of Client Proxy
 */
